#pragma once
#include<memory>

#ifdef MGE_PLATFORM_WINDOWS
#if MGE_DYNAMIC_LINK
	#ifdef MGE_BUILD_DLL
	#define MGE_API _declspec(dllexport)
	#else 
	#define MGE_API _declspec(dllimport) 
	#endif
#else
#define MGE_API
#endif

#else
#error Only Windows

#endif

#ifdef MGE_ENABLE_ASSERTS
	#define MGE_ASSERT(x, ...) {if(!(x)){ MEG_ERROR("Assertion failed: {0}", __VA_ARGS__);__debugbreak();}}
	#define MGE_CORE_ASSERT(x, ...) {if(!(x)){ MEG_CORE_ERROR("Assertion failed: {0}", __VA_ARGS__);__debugbreak();}}
#else
	#define MGE_ASSERT(x, ...)
	#define MGE_CORE_ASSERT(x, ...)
#endif

#define BIT(x) (1 << x)

#define MGE_BIND_EVENT_FN(fn) std::bind(&fn, this, std::placeholders::_1)


namespace myMiniEngine {

	template<typename T>
	using Scope = std::unique_ptr <T>;

	template<typename T>
	using Ref = std::shared_ptr <T>;

}